package com.firewolf.rabbitmq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;

import com.rabbitmq.client.Channel;
/**
 * 自定义消息处理器，需要实现ChannelAwareMessageListener接口
 * @author liuxing
 *
 */
public class RabbitMQListener implements ChannelAwareMessageListener{

	@Override
	public void onMessage(Message message, Channel channel) throws Exception {
		System.out.println(new String(message.getBody()));
	}

}
